package com.ddone.demo;

import com.alibaba.excel.EasyExcel;
import com.ddone.demo.listener.TeacherVoReadListener;
import com.ddone.demo.vo.TeacherVo;
import org.junit.Test;

/**
 * @author ddone
 * @date 2024/4/12-20:51
 */
public class EasyExcelReadTest {

    @Test
    public void testRead(){
        String workPath = System.getProperty("user.dir");
        String filePath = workPath + "/src/main/resources/excel/t4.xlsx";
        EasyExcel.read(filePath)
                .head(TeacherVo.class)
                .sheet("2")
                .registerReadListener(new TeacherVoReadListener())
                .doRead();
    }
}
